#include <iostream>
#include <cstdlib>
#include <ctime>
#include <string>
#include <vector>
#include "Planif.hh"


int
main(int argc, char *argv[]) 
{
  
  srandom(time(NULL)); // Seed random number generator.

  std::vector<Option> options;
  while(!std::cin.eof())
    {
      Option opt;
      std::cin >> opt.from >> opt.to >> opt.cost;
      if(!std::cin.fail())
	options.push_back(opt);
    }

  std::vector<Option> plan(get_an_optimal_plan(options, true));

  bug << "Minimal cost plan" << std::endl;
  dump(bug.file, plan);

  std::vector<Option> planB(get_an_optimal_plan(options, false));
  bug << "Maximal cost plan" << std::endl;
  dump(bug.file, planB);




  
  return 0;
}
